import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '会员ID',
    align: "center",
    dataIndex: 'memberId'
  },
  {
    title: '提现金额',
    align: "center",
    dataIndex: 'money'
  },
  {
    title: '提现前余额',
    align: "center",
    dataIndex: 'lastBalance'
  },
  {
    title: '提现后余额',
    align: "center",
    dataIndex: 'balance'
  },
  {
    title: '提现状态:0-待审核，1-审核通过，2-审核失败',
    align: "center",
    dataIndex: 'withdrawStatus_dictText'
  },
  {
    title: '提现失败原因',
    align: "center",
    dataIndex: 'reason'
  },
  {
    title: '账户类型：0-支付宝，1-微信，2-银联',
    align: "center",
    dataIndex: 'accountType_dictText'
  },
  {
    title: '提现账号（账号信息、银行卡号等）',
    align: "center",
    dataIndex: 'withdrawAccount'
  },
  {
    title: '关联名称（支付宝-实名，微信-昵称，银联-持卡人）',
    align: "center",
    dataIndex: 'withdrawName'
  },
  {
    title: '银行名称',
    align: "center",
    dataIndex: 'bankName'
  },
  {
    title: '支行信息',
    align: "center",
    dataIndex: 'bankBranchName'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "会员ID",
    field: 'memberId',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "提现状态:0-待审核，1-审核通过，2-审核失败",
    field: 'withdrawStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "withdraw_status"
    },
    colProps: {span: 6},
  },
  {
    label: "账户类型：0-支付宝，1-微信，2-银联",
    field: 'accountType',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "account_type"
    },
    colProps: {span: 6},
  },
  {
    label: "提现账号（账号信息、银行卡号等）",
    field: 'withdrawAccount',
    component: 'Input',
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '会员ID',
    field: 'memberId',
    component: 'Input',
  },
  {
    label: '提现金额',
    field: 'money',
    component: 'InputNumber',
  },
  {
    label: '提现前余额',
    field: 'lastBalance',
    component: 'InputNumber',
  },
  {
    label: '提现后余额',
    field: 'balance',
    component: 'InputNumber',
  },
  {
    label: '提现状态:0-待审核，1-审核通过，2-审核失败',
    field: 'withdrawStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "withdraw_status"
    },
  },
  {
    label: '提现失败原因',
    field: 'reason',
    component: 'Input',
  },
  {
    label: '账户类型：0-支付宝，1-微信，2-银联',
    field: 'accountType',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "account_type"
    },
  },
  {
    label: '提现账号（账号信息、银行卡号等）',
    field: 'withdrawAccount',
    component: 'Input',
  },
  {
    label: '关联名称（支付宝-实名，微信-昵称，银联-持卡人）',
    field: 'withdrawName',
    component: 'Input',
  },
  {
    label: '银行名称',
    field: 'bankName',
    component: 'Input',
  },
  {
    label: '支行信息',
    field: 'bankBranchName',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
